<div class="p-h-md p-v bg-white box-shadow pos-rlt">
  <h3 class="no-margin">账单流水</h3>
</div>
<div class="p-md">
  <div class="panel panel-default">
    <div class="panel-heading">流水列表</div>
    <div class="panel-body">
      <div class="pull-right hidden-xs w">
      </div>
    </div>
    <table class="table table-bordered table-hover bg-white">
      <thead>
      <tr>
        <th>流水号</th>
        <th>交易时间</th>
        <th>账户余额</th>
        <th>交易金额</th>
        <th>交易类型</th>
        <th>状态</th>
      </tr>
      </thead>
      <tbody>
      </tbody><colgroup><col>
      <col width="30%">
      <col width="10%">
      <col width="10%">
      <col width="9%">
      <col width="9%">
      <col width="">
    </colgroup>
      <tbody>
      <% @account_flows&.each do |account_flow| %>

          <tr>
            <td> <%= account_flow.flow_id%></td>
            <td><%= DateTime.parse(account_flow.created_at.to_s).strftime('%Y-%m-%d %H:%M:%S').to_s %></td>
            <td><%=number_to_currency(account_flow.user.balance,  :unit=>"￥")%></td>
            <td><%=number_to_currency(account_flow.amount,  :unit=>"￥")%></td>
            <td><%= account_flow.account_type == 1 ? '消费':'充值'%></td>
            <td>
              <%= link_to '', account_flow, method: :delete, data: {confirm: '确定删除么?'} ,class: 'fa fa-trash-o m-l-sm materials-action-icon'%>
            </td>
          </tr>
      <% end %>

      </tbody>
    </table>
    <div class="text-center">
      <%= will_paginate  @account_flows%>
    </div>
  </div>
</div>